Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reakit-utils

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reakit-utils

Reakit utils

  • 0.12.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28K
decreased by-79.83%
Maintainers
1
Weekly downloads
 
Created

What is reakit-utils?

The reakit-utils package provides a collection of utility functions that are useful for building accessible and reusable React components. These utilities help with DOM manipulation, event handling, and other common tasks in React development.

What are reakit-utils's main functionalities?

DOM Utilities

DOM utilities help with common DOM manipulation tasks. For example, `isVisibleInViewport` checks if an element is visible within the viewport.

const element = document.getElementById('myElement');
const isVisible = isVisibleInViewport(element);

Event Utilities

Event utilities simplify event handling. The `addEventListener` function, for instance, adds an event listener to a DOM element.

import { addEventListener } from 'reakit-utils';

const handleClick = () => console.log('Element clicked');
addEventListener(document.getElementById('myElement'), 'click', handleClick);

Array Utilities

Array utilities provide functions for common array operations. `removeItemFromArray` removes a specified item from an array.

import { removeItemFromArray } from 'reakit-utils';

const array = [1, 2, 3, 4];
const newArray = removeItemFromArray(array, 3); // [1, 2, 4]

String Utilities

String utilities offer functions for string manipulation. The `capitalize` function capitalizes the first letter of a string.

import { capitalize } from 'reakit-utils';

const text = 'hello world';
const capitalizedText = capitalize(text); // 'Hello world'

Other packages similar to reakit-utils

Keywords

FAQs

Package last updated on 04 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc